namespace HelpDeskTool.Extensions;

public static class CollectionExt
{
	public static ICollection<T> AddRange<T>(this ICollection<T> collection, IEnumerable<T> range)
	{
		foreach (var value in range.ToArray())
			collection.Add(value);

		return collection;
	}

	public static ICollection<T> RemoveRange<T>(this ICollection<T> collection, IEnumerable<T> range)
	{
		foreach (var value in range.ToArray())
			collection.Remove(value);

		return collection;
	}
}
